package cn.zdm.demo2.auth.service.impl;

import cn.zdm.demo2.auth.mapper.IosAppPoMapper;
import cn.zdm.demo2.auth.model.po.IosAppPO;
import cn.zdm.demo2.auth.service.IosAppService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * copyright (C), 2021, 武大吉奥科技有限公司
 *
 * @Program demo2
 * @Description
 * @Author ZhaoDeman
 * @Create 2021/1/19 23:00
 * @Version 1.0.0
 * <author>                <time>                  <version>                   <description>
 * ZhaoDeman        2021/1/19 23:00                 1.0
 */
@Service
@Slf4j
public class IosAppServiceImpl extends ServiceImpl<IosAppPoMapper, IosAppPO> implements IosAppService {

    @Autowired
    private IosAppPoMapper iosAppPoMapper;

    @Override
    public Integer saveIosApp(IosAppPO iosAppPO) {
        try {
            return iosAppPoMapper.insert(iosAppPO);
        } catch (Exception e) {
            log.error("iosAppPoMapper====>{}", e);
        }
        return 0;
    }

    @Override
    public List<IosAppPO> queryIosApp() {
        return iosAppPoMapper.queryIosApp();
    }

    @Override
    public Boolean delIosApp(String appId) {
        return iosAppPoMapper.deleteById(appId) > 0 ? true : false;
    }
}
